package com.example.entity;

public class Capture implements Item, Comparable<Capture>{
	private String path;
	private String title;
	private String thumbnail;
	
	public Capture() {}
	public Capture(String path, String title) {
		this.path = path;
		this.title = title;
	}
	public Capture(String path, String title, String thumbnail) {
		this.path = path;
		this.title = title;
		this.thumbnail  =thumbnail;
	}
	
	public String getPath() {
		return path;
	}
	public void setPath(String path) {
		this.path = path;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	
	@Override
	public int compareTo(Capture another) {
		return this.path.compareTo(another.getPath()) * -1;
	}
	
	@Override
	public boolean equals(Object o) {
		if (o == null)
			return false;
		
		Capture capture = (Capture) o; 
		return this.path.equals(capture.getPath());
	}
	
	@Override
	public String getKey() {
		return this.path;
	}
	public String getThumbnail() {
		return thumbnail;
	}
	public void setThumbnail(String thumbnail) {
		this.thumbnail = thumbnail;
	}
}
